import axios from '../axios'

/*
 * 文章管理模块
 */

// 保存
export const saveType = (data) => {
  return axios({
    url: '/api/type/add',
    method: 'post',
    data
  })
}
export const saveCate = (data) => {
  return axios({
    url: '/api/category/add',
    method: 'post',
    data
  })
}
export const detailType = (data) =>{
  return axios({
    url:'/api/category/detail',
    method:'post'
  })
}
export const detailCate = (data) =>{
  return axios({
    url:'/api/category/detail',
    method:'post'
  })
}
// 删除
export const batchDelete = (data) => {
  return axios({
    url: '/api/type/batch/del',
    method: 'post',
    data
  })
}
// 删除
export const batchDeleteCate = (data) => {
  return axios({
    url: '/api/category/batch/del',
    method: 'post',
    data
  })
}
// 分页查询
export const findPageType = (data) => {
  return axios({
    url: '/api/type/page',
    method: 'POST',
    data
  })
}
// 分页查询
export const findPageCate = (data) => {
  return axios({
    url: '/api/category/page',
    method: 'POST',
    data
  })
}
// 分页查询
export const findListType = (data) => {
  return axios({
    url: '/api/type/list',
    method: 'POST',
    data
  })
}
// 分页查询
export const findListCate = (data) => {
  return axios({
    url: '/api/category/list',
    method: 'POST',
    data
  })
}
